/**
 * 2
 *  
 * @Author : Ruoyu Wang
 * @DateTime : 24-9-14 下午2:26
 */

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        if (n == 0) {
            cout << 0 << endl;
            continue;
        }
        vector<int> nums(n);
        for (int i = 0; i < n; ++i) {
            cin >> nums[i];
        }

        vector<int> left(n, 1), right(n, 1);

        for (int i = 1; i < n; ++i) {
            if (nums[i] > nums[i - 1]) {
                left[i] = left[i - 1] + 1;
            }
        }

        for (int i = n - 2; i >= 0; --i) {
            if (nums[i] < nums[i + 1]) {
                right[i] = right[i + 1] + 1;
            }
        }

        int res = max(*max_element(left.begin(), left.end()), *max_element(right.begin(), right.end()));

        for (int i = 1; i < n - 1; ++i) {
            if (nums[i - 1] < nums[i + 1]) {
                res = max(res, left[i - 1] + right[i + 1]);
            }
        }

        cout << res + 1 << endl;
    }
    return 0;
}